export default {
  env: {
    NODE_ENV: process.env.NODE_ENV
  },
  // Disable server-side rendering: https://go.nuxtjs.dev/ssr-mode
  ssr: false,

  // Global page headers: https://go.nuxtjs.dev/config-head
  head: {
    title: '数科帮',
    htmlAttrs: {
      lang: 'en'
    },
    base: {href: '/skb/'},
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width, initial-scale=1' },
      { hid: 'description', name: 'description', content: '' },
      { name: 'format-detection', content: 'telephone=no' }
    ],
    // link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }],
    link: [
      { rel: 'icon', type: 'image/x-icon', href: 'https://www.ccccdt.com/skb/favicon.ico' },
      {
        rel: 'stylesheet',
        type: 'text/css',
        href: 'https://www.ccccdt.com/skb/css/reset.min.css'
      },
      {
        rel: 'stylesheet',
        type: 'text/css',
        href: 'https://www.ccccdt.com/skb/css/common.min.css'
      }
    ],
    script: [{ src: 'https://www.ccccdt.com/skb/js/jquery.min.js' }]
  },
  //loading
  loading: { color: '#597ef7' }, //'~/components/loading.vue'
  // Global CSS: https://go.nuxtjs.dev/config-css
  css: ['element-ui/lib/theme-chalk/index.css'],

  // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
  plugins: [
    '@/plugins/axios',
    '@/plugins/element-ui',
    //'@/plugins/push',
    '@/plugins/qs',
    '@/plugins/rews',
    '@/plugins/tools',
    //'@/plugins/pwa-install-prompt',
    '@/plugins/ls',
    '@/plugins/socket-io.js',
    //'@/Plugins/driver.js'
    //'@/plugins/vue-tribute.js'
    '@/plugins/update-title.js'
  ],

  // Auto import components: https://go.nuxtjs.dev/config-components
  components: true,

  // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
  buildModules: [],

  // Modules: https://go.nuxtjs.dev/config-modules
  modules: [
    // https://go.nuxtjs.dev/axios
    //'@nuxtjs/axios',
    'cookie-universal-nuxt'
    // '@nuxtjs/pwa'
  ],
  // pwa: {
  //   icon: {
  //     fileName: 'logo-512.png' // 设置应用图标
  //   },
  //   manifest: {
  //     name: '数科帮',
  //     short_name: '数科帮',
  //     start_url: '/main/group_chat',
  //     display: 'fullscreen',
  //     background_color: '#ffffff',
  //     theme_color: '#E9EAEC',
  //     scope: '/'
  //   },
  //   autoRegister: false
  // },
  workbox: {
    // Optional: custom Workbox configuration
  },
  server: {
    host: '0.0.0.0',
    port: '3500'
  },
  // Axios module configuration: https://go.nuxtjs.dev/config-axios
  axios: {
    // Workaround to avoid enforcing hard-coded localhost:3000: https://github.com/nuxt-community/axios-module/issues/308
    baseURL: '/'
  },
  router: {
    middleware: ['checkLogin'],
    base: '/skb/'
  },
  // Build Configuration: https://go.nuxtjs.dev/config-build
  build: {
    transpile: [/^element-ui/],
    publicPath: '/_skb_nuxt/'
  }
}
